home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
doors_1
/
mach10.zip
/
COMMON.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-07-25
|
8KB
|
216 lines
unit common;
{ Common data declarations and procedures used for bbs }
interface
uses crt, { Turbo Pascal standard crt unit }
dos, { Turbo Pascal standard dos unit }
config, { Procedures for reading the con- }
{ figuration file. Also contains }
{ configuration variables }
scottlib; { Misc. Procedures and functions }
const
name= 'Mach-10 bbs';
v='version';
version='2.32ß';
copywrit= 'Copywrite (C) 1988,89,90';
by='by';
author='Scott Baker & Jonathan Woods';
SizeFileIndex=2000;
type
hourtype= array[0..23] of word;
menutype= (Main, Message, Files, Sigop, Util);
sextype= (Male, Female);
graphtype= (None, Ascii, Ansic, Music);
msg_save_type = array[1..200] of word;
mem_type = array[1..200] of byte;
datetype= string[6];
node_rec= record
active: boolean;
chatting: boolean;
avail: boolean;
name: string[30];
text: string[80];
read: array[1..20] of boolean;
channel: byte;
paged: byte;
lastflink: word;
TimeOn: string[20];
Access: byte;
timeleft: byte;
blah: array[1..255] of byte;
end;
mtime_rec = record
user_Rec_num: word;
hr,mn,sec,sec100: word;
com_port: byte;
baud_rate: word;
local: boolean;
end;
user_Rec= record
name: string[30];
alias: string[20];
password: string[10];
access: byte;
logons: word;
last_called: datetype;
graphics: graphtype;
elapsed_today: byte;
address: string[40]; { Personal information }
city: string[10];
state: string[2];
zip: string[5];
voice_phone: string[10];
data_phone: string[10];
sex: sextype;
age: byte;
comp_type: byte;
post: word; { Statistical info }
post_time: word;
read: word;
read_time: word;
downloads: word;
download_k: word;
download_time: word;
uploads: word;
upload_k: word;
upload_time: word;
doors: word;
door_time: word;
total_time: longint;
msg_saves: msg_save_type; { All message area lastread pointers }
membership: mem_type; { Membership to message bases }
credit: byte; { USER NETMAIL }
protocol_type: char; { Default protocol type }
flags: word; { Flag byte: defined as follows }
{ 1 - Validated }
{ 2 - eXpert }
{ 3 - Visual editor on }
{ 4 - Fast-keys }
{ 5 - Prompt bell enabled }
{ 6 - YooHoo }
{ 7 - 40 column mode }
{ 8 - more prompt }
{ 9 - color active }
{10 - Spy }
{11 - Top x Uploader }
{12 - Top x Caller }
{13 - Top x Poster }
end;
analizer_Rec = record
date: datetype;
time_elapsed: longint; { Statistics - time }
time_dload: longint;
time_uload: longint;
time_doors: longint;
time_read: longint;
time_post: longint;
downloads: word; { Statistics - countables }
uploads: word;
doors: word;
post: word;
read: word;
sysop_page: word;
download_k: word;
upload_k: word;
logons: word; { Logging on and logging off }
logoffs: word;
sleeps: word;
carrier_drops: word;
conferences: array[1..200] of word;
door: array[1..200] of word;
areas: array[1..200] of word;
prots: array[1..20] of word;
hours: hourtype;
local: word;
baud300: word;
baud1200: word;
baud2400: word;
baud4800: word;
baud9600: word;
male: word;
female: word;
messagestats: array[1..255] of word;
doorstats: array[1..255] of word;
filestats: array[1..255] of word;
end;
file_rec = record
name: string[8]; { Filename - 8 bytes }
ext: string[3]; { extension - 3 bytes }
uploader: string[25]; { Who uploaded it }
size: longint; { Size (integer) }
date: datetype; { The date }
area: byte; { where it's stored }
desc: string[50]; { What it is }
acc: byte;
end;
file_index = record
name: string[8]; { Filename - 8 bytes }
ext: string[3]; { extension - 3 bytes }
date: datetype; { The date }
area: byte; { where it's stored }
end;
index_array= array[0..SizeFileIndex] of file_index;
index_ptr= ^index_array;
MarkPtr= ^Marked_rec;
Marked_rec = record
areanum: word;
num: word;
next, prev: MarkPtr;
end;
var
FirstMark, Lastmark: markPtr;
SysopMessages: msg_save_type;
findex: index_ptr;
index_made: boolean;
returning_from_door: boolean;
users: file of user_rec; { Catalog of all users }
filecat: file of file_rec; { Catalog of all D/L files }
callers: text; { Caller log (text) }
analizer: file of analizer_rec; { Call analizer file }
current_menu_number: byte; { Current menu number }
current_access: access_def_entry; { Access level of user }
user: user_Rec; { Current user on the system }
userptr: word; { Word pointer to users record }
save_user: boolean; { True if ok to write rec on exit}
bulletin_file_name: string; { Name and path of the bulletins }
num_bulletins: byte; { Number of bulletins }
Current_area: Conference_def_entry; { Name of the current conf area }
goodbye_user: boolean; { True if user has used goodbye }
stats: analizer_Rec;
nodes: file of node_rec;
current_node: node_Rec;
implementation
end.